home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / ee / rexx / adoclookup.rexx next >
OS/2 REXX Batch file  |  1995-09-03  |  789b  |  40 lines

  1. /*
  2.  
  3. example script for ee
  4. load an autodoc according to the word under the cursor from a filelist which
  5. looks like this:
  6.  
  7. funcname autodocfile [linenumber]
  8.  
  9. OpenWindow autodocs:intuition/intuition.h 42
  10.  
  11. idea and first draft by Gregor Goldbach
  12.  
  13. */
  14.  
  15. ADDRESS 'EE.0'
  16. OPTIONS RESULTS
  17.  
  18. ARG datname
  19.  
  20. IF datname="" THEN datname="EE:rexx/autodoc/autodoclist.ee"
  21.  
  22. IF Open(autodoclist, datname, 'R') THEN
  23.   DO
  24.     LockWindow
  25.     GetWord
  26.     funcname=RESULT
  27.     posi=Index(funcname, '(')
  28.     IF posi>0 THEN funcname=Left(the_word, posi-1)
  29.     DO UNTIL (Word(the_line,1)=funcname)=1 | Eof(autodoclist)
  30.       the_line=Readln(autodoclist)
  31.       SAY the_line
  32.     END
  33.     the_file=Word(the_line,2)
  34.     OpenNew the_file
  35.     GotoLine Word(the_line, 3)
  36.     UnlockWindow
  37.   END
  38. ELSE
  39.   SAY 'Could not open file.'
  40.